
#include <android_native_app_glue.h>

///////////
// kisme //
///////////

// object
#include "../../object/base/Object_Base.h"

#ifndef _ASSET_ADAPTER_H
#define _ASSET_ADAPTER_H


/** 配置数组的类型定义 */
typedef float CONFTYPE;


/**
 *  config info
 */
struct Asset_Adapter_Conf : public Object_Base_Conf {
    // 配置数组
    CONFTYPE* m_tConfs;
    // app
    struct android_app* m_sApp;
    // assert manager
    AAssetManager* m_cAssMgr;
    
    Asset_Adapter_Conf();
    
};

class Asset_Adapter : public Object_Base
{
public:
    
    	/**
	 * 传入app对象
	 * 并且APP里的assertmanager 拿出来放到info中存放
	 */
	void appSet(struct android_app* a_sApp);

	/**
	 * 目前和接口函数功能一样，为以后做铺垫
	 */
	AAsset* assOpen(const char* a_strfilename, int a_nMode);
	
	/**
	 * seek the position
	 */
	off_t assSeek(AAsset* a_vAsset, off_t a_nOffset, int a_nWhence);
	
	/**
         * construction
         * init conf-file
         */
	Asset_Adapter();
private:

    Asset_Adapter_Conf* m_sAsset_Adapter_Conf;
    
};

#endif





